package com.zzyl.nursing.mapper;

import cn.hutool.db.PageResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.FamilyMemberElder;
import com.zzyl.nursing.dto.QueryDeviceDataDto;
import com.zzyl.nursing.vo.FamilyMemberElderVo;
import com.zzyl.nursing.vo.FamilyMemberVo;
import com.zzyl.nursing.vo.QueryDeviceDataVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 老人与老人家属关联Mapper接口
 * 
 * @author alexis
 * @date 2025-03-12
 */
@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder>
{
    /**
     * 查询老人与老人家属关联
     * 
     * @param id 老人与老人家属关联主键
     * @return 老人与老人家属关联
     */
    public FamilyMemberElder selectFamilyMemberElderById(Long id);

    /**
     * 查询老人与老人家属关联列表
     * 
     * @param familyMemberElder 老人与老人家属关联
     * @return 老人与老人家属关联集合
     */
    public List<FamilyMemberElder> selectFamilyMemberElderList(FamilyMemberElder familyMemberElder);

    /**
     * 新增老人与老人家属关联
     * 
     * @param familyMemberElder 老人与老人家属关联
     * @return 结果
     */
    public int insertFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 修改老人与老人家属关联
     * 
     * @param familyMemberElder 老人与老人家属关联
     * @return 结果
     */
    public int updateFamilyMemberElder(FamilyMemberElder familyMemberElder);

    /**
     * 删除老人与老人家属关联
     * 
     * @param id 老人与老人家属关联主键
     * @return 结果
     */
    public int deleteFamilyMemberElderById(Long id);

    /**
     * 批量删除老人与老人家属关联
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFamilyMemberElderByIds(Long[] ids);

    /**
     * 分页查询
     * @return java.util.List<com.zzyl.nursing.vo.FamilyMemberVo>
     */
    PageResult<FamilyMemberVo> selectFamilyMemberElder();

    /**
     * 查询家人列表
     * @return java.util.List<com.zzyl.nursing.vo.FamilyMemberElderVo>
     */
    List<FamilyMemberElderVo> listFamilyMemberElder();

    /**
     * 按天统计查询指标数据
     *
     */
    List<QueryDeviceDataVo> queryDeviceDataListByDay(QueryDeviceDataDto queryDeviceDataDto);

    /**
     * 按周统计查询指标数据
     *
     */
    List<QueryDeviceDataVo> queryDeviceDataListByWeek(QueryDeviceDataDto queryDeviceDataDto);
}
